@extends('master')

@section('content')
<div class="management-content">
    <div class="container">
        <div class="record-list">
           @if(Session::get('message'))
          <div class="alert alert-info" role="alert">{{ Session::get('message') }}</div>
           @endif

           @if(Session::get('error'))
          <div class="alert alert-danger" role="alert">{{ Session::get('error') }}</div>
           @endif

           @if(count($products) != 0)
            <h2>购物车</h2>
            <table class="table">
                <thead>
                    <tr>
                        <th>图片</th>
                        <th>图片信息</th>
                        <th>描述</th>
                        <th>价格</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                   @foreach ($products as $product)
                    <tr>
                        <td>
                            <img src="{{ '/uploads/picture/' . $product->pictureInfo->thumb }}" alt="">
                        </td>
                        <td>
                            <span>图片ID : {{ $product->pictureInfo->sku }}</span>
                            <span>上传时间: {{ $product->pictureInfo->created_at }}</span>
                            <span>状态: {{ $product->pictureInfo->status }}</span>
                        </td>
                        <td>
                            <p>描述信息</p>
                            <h4>关键字</h4>
                            <p>

                            </p>
                        </td>
                        <td>
                            ¥ {{ $product->pictureInfo->price }}
                        </td>
                        <td>
                            <a href="/shoppingcart/delete/{{ $product->pictureInfo->id }}" class="btn btn-sm btn-danger"><i class="glyphicon glyphicon-trash"></i> 删除</a>
                        </td>
                    </tr>
                    @endforeach
                </tbody>
            </table>
            <div class="row order-info">
               <div class="pull-left col-sm-6">
                  <span class="label label-info">
                      提交完订单，在我的订单里面，就可以进行图片下载。
                  </span>

               </div>
                <div class="pull-right  col-sm-6">
                  <button type="submit" class="btn btn-primary pull-right" onclick="window.location='/order/create'">提交订单</button>
                   <div class="pull-right">
                       订单小计： <span>¥ 0</span>
                   </div>


                </div>
            </div>
            <div class="row">

            </div>



            @else
            <div class="alert alert-danger" role="alert">没有任何记录！ <a href="/picture/fresh" class="alert-link">挑选</a></div>
            @endif


        </div>

    </div>
</div>
@stop




